package test;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.zefu.entity.Dept;
import com.zefu.service.DeptService;

public class app {

	@Test
	public void app1(){
		ApplicationContext ac = new ClassPathXmlApplicationContext("classpath:spring-mybatis.xml");
		DeptService service = (DeptService) ac.getBean("deptService");
		
		//System.out.println(service.selectDept(1));
		
		Dept dept = new Dept();
		dept.setDeptName("研发四部");
		dept.setDeptAddress("福州");
		System.out.println("影响了"+service.insertDept(dept)+"行");
	}
}
